#ifndef __PHY_DRIVER__
#define __PHY_DRIVER__

#include "Type_Define.h"
#include "DL_Mode_Handler.h"
#include "DL_Message_Handler.h"
#include "SM.h"
#include "DL_Service.h"
#include <stdint.h>

 

 


int PL_Init(void);
void EstCOM(uint8_t Port);
     
void Send_MC(uint8_t Port );
void StartISDUTimer(uint8_t Port);
void StopISDUTimer(uint8_t Port);
COM_Speed_TYPE Get_COM_Speed(uint8_t Port);

//物理层服务
void PL_Wake_Up(uint8_t Port); //发出唤醒信号
void Set_Timer_of_Tdmt(uint8_t Port,uint16_t time); //设置Tdmt定时器
void Set_Timer_of_Tdwu(uint8_t Port);
//将接口转换到IO-LINK模式
void Service_PL_SetMode_SDCI(uint8_t Port);
void Service_PL_SetMode_DI(uint8_t Port);
void Service_PL_SetMode_DO(uint8_t Port);

//延时动作
void Delay_T_Mc(uint8_t Port);


//周期定时器操作函数
BOOL StartCycleTimer(uint8_t Port,uint16_t masterCycleTime); //开启周期定时器

BOOL StopCycleTimer(uint8_t Port);//停止周期定时器

//直接硬件操作
/*****************直接硬件操作*******************/
void set_COM_Speed(uint8_t Port,uint32_t speed);//调试使用，Max14819不需要
	

/************Falsh操作****************/
 //将SMI配置的ConfigList存储到Flash
 void  Save_Data_To_FlashROM(uint32_t FlashAddress,void * Data,uint8_t DataSize);
  
//从Flash中读取参数
 void Read_Data_From_FlashROM(uint32_t FlashAddress,void * Data,uint8_t DataSize);

 void Delete_DS_Data_In_FlashROM(void);
#define __MAX14819__
#endif



